package com.jar.netty_demo.Netty.dubbo.consume;

import com.jar.netty_demo.Netty.dubbo.netty.NettyClient;
import com.jar.netty_demo.Netty.dubbo.producer.HelloService;

public class ConsumeBootstrap {
    private static final String providerName = "HelloService:say";

    public static void main(String[] args) {

        try {
            NettyClient nettyClient = new NettyClient();
//            Class<?> helloServiceClass = Class.forName("com.jar.netty_demo.Netty.dubbo.producer.HelloService");
            HelloService helloServices = (HelloService) nettyClient.getBean(HelloService.class, providerName);
            String message = helloServices.say("你好，dubbo");
            System.out.println("调用的结果 res= " + message);
        } catch (Exception e) {
            throw e;
        }
    }
}
